home *** CD-ROM | disk | FTP | other *** search
- package symjava.sql;
-
- public class SQLException extends Exception {
- private String SQLState;
- private int vendorCode;
- private SQLException next;
-
- public SQLException(String reason, String SQLState, int vendorCode) {
- super(reason);
- this.SQLState = SQLState;
- this.vendorCode = vendorCode;
- if (!(this instanceof SQLWarning) && DriverManager.getLogStream() != null) {
- DriverManager.println("SQLException: SQLState(" + SQLState + ") vendor code(" + vendorCode + ")");
- ((Throwable)this).printStackTrace(DriverManager.getLogStream());
- }
-
- }
-
- public SQLException(String reason, String SQLState) {
- super(reason);
- this.SQLState = SQLState;
- this.vendorCode = 0;
- if (!(this instanceof SQLWarning) && DriverManager.getLogStream() != null) {
- ((Throwable)this).printStackTrace(DriverManager.getLogStream());
- DriverManager.println("SQLException: SQLState(" + SQLState + ")");
- }
-
- }
-
- public SQLException(String reason) {
- super(reason);
- this.SQLState = null;
- this.vendorCode = 0;
- if (!(this instanceof SQLWarning) && DriverManager.getLogStream() != null) {
- ((Throwable)this).printStackTrace(DriverManager.getLogStream());
- }
-
- }
-
- public SQLException() {
- this.SQLState = null;
- this.vendorCode = 0;
- if (!(this instanceof SQLWarning) && DriverManager.getLogStream() != null) {
- ((Throwable)this).printStackTrace(DriverManager.getLogStream());
- }
-
- }
-
- public String getSQLState() {
- return this.SQLState;
- }
-
- public int getErrorCode() {
- return this.vendorCode;
- }
-
- public SQLException getNextException() {
- return this.next;
- }
-
- public synchronized void setNextException(SQLException ex) {
- SQLException theEnd;
- for(theEnd = this; theEnd.next != null; theEnd = theEnd.next) {
- }
-
- theEnd.next = ex;
- }
- }
-